Folding Transformation Rules for Constraint Logic Programs
نویسندگان
چکیده
We consider the folding transformation rule for constraint logic programs. We propose an algorithm for applying the folding rule in the case where the constraints are linear equations and inequations over the rational or the real numbers. Basically, our algorithm consists in reducing a rule application to the solution of one or more systems of linear equations and inequations. We also introduce two variants of the folding transformation rule. The first variant combines the folding rule with the clause splitting rule, and the second variant eliminates the existential variables of a clause, that is, those variables which occur in the body of the clause and not in its head. Finally, we present the algorithms for applying these variants of the folding rule.
منابع مشابه
Rules and Strategies for Contextual Specialization of Constraint Logic Programs
We address the problem of specializing a constraint logic program w.r.t. a constrained atom which speciies the context of use of the program. We follow an approach based on transformation rules and strategies. We introduce a novel transformation rule, called contextual constraint replacement, to be combined with variants of the traditional unfolding and folding rules. We present a general Parti...
متن کاملProving Theorems by Program Transformation
In this paper we present an overview of the unfold/fold proof method, a method for proving theorems about programs, based on program transformation. As a metalanguage for specifying programs and program properties we adopt constraint logic programming (CLP), and we present a set of transformation rules (including the familiar unfolding and folding rules) which preserve the semantics of CLP prog...
متن کاملTransformation Rules for Locally Stratified Constraint Logic Programs
We propose a set of transformation rules for constraint logic programs with negation. We assume that every program is locally stratified and, thus, it has a unique perfect model. We give sufficient conditions which ensure that the proposed set of transformation rules preserves the perfect model of the programs. Our rules extend in some respects the rules for logic programs and constraint logic ...
متن کاملProving termination of CHR in Prolog: A transformational approach
In this paper we present a termination preserving transformation from Constraint Handling Rules to Prolog. The transformation is sound w.r.t. termination under the theoretical semantics of Constraint Handling Rules. It does not consider the presence of a propagation history. The transformation allows for the direct reuse of termination proof methods from Logic Programs and Term-Rewrite Systems,...
متن کاملInduction Proofs by Program Transformations
Unfold/fold transformations have been studied for various declarative programming languages such as functional languages [5, 12, 21], logic programming [14, 22, 23] and constraint logic programming [1, 8, 13]. Some of the most extensively studied transformation systems for logic programs are the unfold/fold transformation systems. At a high level, unfold and fold transformations for definite lo...
متن کامل